<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Layui</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="/layui/css/layui.css" media="all">
<!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
	<form class="layui-form layui-form-pane" action="">

		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">订单编号</label>
				<div class="layui-input-inline">
					<input type="text" name="orderId" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">仓库名称</label>
				<div class="layui-input-inline">
					<input type="text" name="sooWarehouseName" autocomplete="off"
						class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">起始时间</label>
				<div class="layui-input-block">
					<input type="text" name="startDate" id="startDate"
						autocomplete="off" class="layui-input" lay-key="2">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">结束时间</label>
				<div class="layui-input-block">
					<input type="text" name="endDate" id="endDate" autocomplete="off"
						class="layui-input" lay-key="2">
				</div>
			</div>

			<div class="layui-inline">
				<button class="layui-btn" lay-submit="" lay-filter="query">查询</button>
			</div>
		</div>
	</form>
	<table class="layui-hide" id="test" lay-filter="test"></table>
<script type="text/html" id="switchTpl">
	<input type="checkbox" name="status" value="{{d.orderId}}" lay-skin="switch" lay-text="已审批|未审批" lay-filter="status" {{ d.status == 1 ? 'checked' : '' }}>
</script>

<script type="/text/html" id="toolbarDemo">
  <div class="layui-btn-container">
	<button class="layui-btn layui-btn-sm" lay-event="add">新增</button>
  </div>
</script>

<script type="/text/html" id="barDemo">
  <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<script src="/layui/layui.js" charset="utf-8"></script>
<script src="/modules/SioApprove.js" charset="utf-8"></script>
<script src="/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
	$(function(){
		var $sioWarehouseId=$('#sioWarehouseId');
		var $goodsId=$('#goodsId');
		var str;
		$.get("/warehouse/show",function (result) {
			console.log(result)
			$(result.data).each(function(index,element){
            	str="<option value='"+element.warehouseId+"'>"+element.warehouseName+"</option>"
            	$sioWarehouseId.append(str);
			})
	     });
	        
	      $.get('/goods/show', function (result) {
	    	  
	    	  $(result.data).each(function(index,element){
	            	str="<option value='"+element.goodsId+"'>"+element.goodsName+"</option>"
	            	$goodsId.append(str);
				})
	 });
	});


</script>



</body>
</html>